Script generator for automating system administration operations

ABSTRACT

A script generating system includes a data dictionary adapted to include table structure data. A database management system runs a script generator, which includes a plurality of user defined templates. Activation of the script generator utilizes built-in macros within the database management system and extracts the table structure data. Responsively, one of the templates manipulates the table structure data to generate a script.

TECHNICAL FIELD

[0001] The present invention relates generally to script generators, andmore particularly, to a script generator for automating systemadministration operations.

BACKGROUND ART

[0002] As is well known, computer scripts, also referred to as macros orbatch files, are lists of commands that can be executed without userinteraction. A script language is a simple programming language withwhich a programmer can write scripts. Examples thereof include BASIC, C,C++, COBOL, FORTRAN, ADA, and PASCAL. Each language has a unique set ofkey words (words that it particularly understands) and a special syntaxorganizing program instructions. A script generator generates either acomplete computer program written in a prescribed programming languageor a portion thereof.

[0003] Previously, to avoid writing a complete program or a completescript, a programmer would start a project by either reusing someprevious code that was similar to the current project request or bygoing to a repository of standard templates. The programmer thenproceeds with the time consuming task of replacing mirrored code withnew variables. A single project may take a programmer hours or even daysto complete, depending on how much rework must be done on the acquiredcode.

[0004] The disadvantages associated with current script generatingtechniques have made it apparent that a new technique to generate scriptin such a manner to minimize required user input, or reworking ofpreviously written code. The new technique should facilitate the writingof code by automatically updating old or previously used code. Thepresent invention is directed to these ends.

SUMMARY OF THE INVENTION

[0005] The present invention provides a method for automating systemadministration operations for use as a script generator. The presentinvention also provides a system for implementing the script generator.

[0006] In accordance with one aspect of the present invention, a scriptgenerating system includes a data dictionary adapted to include tablestructure data. A database management system runs a script generator,which includes a plurality of user defined templates. Activation of thescript generator utilizes built-in macros within the database managementsystem and extracts the table structure data. Responsively, one of thetemplates manipulates the table structure data to generate a script.

[0007] In accordance with another aspect of the present invention, amethod for generating a script includes running a built-in macro forRBDMS architecture dictionary retrieval, and extracting table structuredata from a RBDMS architecture dictionary. The table structure data isthen converted into an alternate programming language file layout andarranged within a predefined template. Ultimately, a script is generatedfrom the predefined template.

[0008] One advantage of the present invention is that it takes themanual effort of script building, maintenance of database structures andautomates it. A further advantage is that the present invention allowsprogrammers to build personalized collections of local templates.Additional advantages and features of the present invention will becomeapparent from the description that follows and may be realized by theinstrumentalities and combinations particularly pointed out in theappended claims, taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0009] For a more complete understanding of the present invention,reference will now be made to the embodiments illustrated in greaterdetail in the accompanying figures and described below by way ofexamples of the invention wherein:

[0010]FIG. 1 is a schematic view of the script generator for automatingsystem administration operations in accordance with one embodiment ofthe present invention; and

[0011]FIG. 2 is a logic flow diagram of a method for automating systemadministration operations in accordance with another embodiment of thepresent invention.

DETAILED DESCRIPTION

[0012] The present invention is illustrated with respect to a scriptgenerator for automating system administration operations particularlysuited to data management. The present invention is, however, applicableto various other uses that may require system administration operations,as will be understood by one skilled in the art.

[0013] Referring to FIG. 1, a system for automating systemadministration operations (script generating system 10), including ascript generator 12, is illustrated in accordance with one embodiment ofthe present invention. The system 10 also includes a host server 14, adatabase 16, a remote server 18, and a database generator 20, all ofwhich are electrically coupled together.

[0014] The host server 14 may include the database 16, the scriptgenerator 12, and the database generator 20, or alternately the hostserver 14 may be a remote unit from any or all of the aforementionedcomponents.

[0015] The script generator 12 may be included within the server 14 oralternately included in a separate unit. The script generator 12includes a number of templates 22. The script generator 12 is designedsuch that the templates 22 may be edited, deleted, or stored in adifferent of permanent storage unit. The script generator 12 ideallyruns on a relational database management system (RDBMS) or databasemanagement system (DBMS), and may incorporate data architectures, suchas Teradata

[0016] The script generator 12 includes Teradata in one embodiment ofthe present invention. Teradata is a database management system (DBMS)created by NCR Corporation. It includes both custom hardware and customsoftware. A Teradata DBMS is useful because it can handle more than 1terabyte of data, which is why it is used a lot in very large scale datawarehousing applications. Essentially, Teradata is a parallelarchitecture used to efficiently store, retrieve, and process largevolumes of data.

[0017] The script generator 12 may include a DBMS, which is a computerprogram (or more typically, a suite of them) designed to manage adatabase, a large set of structured data, and run operations on the datarequested by numerous users. Typical examples of DBMS uses include:accounting, human resources, and customer support systems. An alternateembodiment of the present invention includes an RDBMS, which is a typeof DBMS that stores data in the form of related tables.

[0018] The templates 22 are stored within the script generator 12.Examples of the templates 22 include an auto load feature to auto load aspecific file, a create duplicate copy from a dictionary table layout togenerate a backup copy for editing of either the original or theduplicate, a multi-load delete to include a delete that works off aseparate file whereby a parallel connection between the two files canresult in a parallel deletion of data within the files, a template forcollecting statistics on columns and upfront optimizations, a templatewith a syntax that purges data from a table or other template therebyallowing two templates to link together, a template including thesecondary index that allows storing of data on a table or removing dataon a table for a separate fast load procedure then reincorporating thedata, a template to replace or update the template with a new template,and a template to clean or filter out data. Important to note is thatnumerous other templates may be designed and incorporated in a systemembodied herein.

[0019] These templates 22 generate error-free scripts for an infinitenumber of table structures by incorporating and manipulating dictionaryinformation from the dictionary 15. The script generator 12 also allowsusers at remote terminals 18 to download the templates 22 and generatenew templates or user-defined templates using predefined variables, suchas the ones used in the templates 22. The templates 22 may also callother templates into the templates 22 as variables, thereby allowing theuser to quickly assemble repetitive, complex script logic solely fromdictionary information.

[0020] The database dictionary 20, which may be a Teradata datadictionary, as most other RDBMS architectures are, holds informationregarding table structures (i.e. column names, data types, formatting,default values, primary index, secondary index, column statistics,views, etc.). By utilizing built-in macros for dictionary retrieval,dictionary information can be obtained instantly on all tablestructures. Once retrieved, this dictionary information is thenmanipulated using the aforementioned predefined templates 22 to generateerror-free scripts 16.

[0021] In one embodiment of the present invention, the remote server 18receives information from the database 16, and a user applies thedatabase information to various programs, such as inventory reports. Inan alternate embodiment, the user designs templates on the remote server18 and extracts dictionary information for use in the templates. Theremote server 18 may include an alternate script generator or may belinked to the script generator 12.

[0022] Referring to FIG. 2, a logic flow diagram of a method forautomating system administration operations is illustrated. Logic startsin operation block 102 where a programmer creates templates 22 usinginformation from the database dictionary 20.

[0023] In operation block 104, either the programmer or a user at aremote terminal 18 chooses the database type with which to run one ofthe templates 22. In operation block 106, the desired procedure isselected, and various templates 22 for implementing the procedure areincorporated within the procedure script.

[0024] In operation block 108, the procedure is displayed in itsentirety. In operation block 110, the procedure is FTPd (file transferprotocol) to various systems requiring the procedure or aspects of theprocedure. In operation 112, the procedure is run on either the server14 or a remote server 18.

[0025] In operation, the method for generating a script 16 includesrunning a built-in macro for RBDMS architecture dictionary retrieval,and extracting table structure data from a RBDMS architecture dictionary20. The table structure data is then converted into an alternateprogramming language file layout, such as COBOL, and arranged within apredefined template 22. Ultimately, a script is generated from thepredefined template 22.

[0026] From the foregoing, it can be seen that there has been brought tothe art a new script generating system 10. It is to be understood thatthe preceding descriptions of various embodiments are merelyillustrative of some of the many specific embodiments that representapplications of the principles of the present invention. Numerous andother arrangements would be evident to those skilled in the art withoutdeparting from the scope of the invention as defined by the followingclaims.

In the claims:
 1. A method for generating a script comprising:generating a template; selecting a procedure requiring said template;extracting information from a dictionary through macros within saidtemplate; and generating the script.
 2. The method of claim 1 furthercomprising: converting said procedure into an alternate programminglanguage file layout.
 3. The method of claim 1 further comprising:running a built-in macro for RBDMS architecture dictionary retrieval. 4.The method of claim 1, wherein extracting information from a dictionaryfurther comprises extracting table structure data from a RBDMS Teradatadictionary.
 5. The method of claim 1 further comprising: arranging tablestructure data within said templates.
 6. The method of claim 1 furthercomprising: generating a plurality of predefined templates includingsaid template.
 7. A method as in claim 6 further comprising: calling oneof said plurality of predefined templates into another one of saidplurality of predefined templates as a variable.
 8. A method as in claim6 wherein arranging table structure data within one of said plurality ofpredefined templates comprises arranging said table structure datawithin one of an auto load feature, a create duplicate copy feature, astatistics collection feature, a delete file that operates off anotherfile resulting in a parallel connection, a syntax that purges a datatable thereby linking templates together, a table build feature allowingdata storage for removal during fast-load procedures, a replace viewfeature, or a clean data feature.
 9. A script generating systemcomprising: a data dictionary adapted to include table structure data;and a database management system adapted to run a script generator, saidscript generator comprising a plurality of user defined templates,wherein activation of said script generator comprises utilizing built-inmacros within said database management system to extract said tablestructure data, wherein one of said plurality of user defined templatesmanipulates said table structure data to generate a script.
 10. Thesystem as in claim 9 wherein said dictionary comprises a Teradata RDBMSarchitecture or other known RDBMS architecture.
 11. The system as inclaim 9 wherein said dictionary comprises a Teradata RDBMS architecturecomprising table structure data such as column names, data types,formatting, default values, primary index, secondary index, columnstatistics, and views.
 12. The system as in claim 9 wherein saidplurality of user defined templates comprise at least one of an autoload feature, a create duplicate copy feature, a statistics collectionfeature, a delete file that operates off another file resulting in aparallel connection, a syntax that purges a data table thereby linkingtemplates together, a table build feature allowing data storage forremoval during fast-load procedures, a replace view feature, and a cleandata feature.
 13. The system as in claim 9 wherein said databasemanagement system is further adapted to convert said table structuredata into an alternate programming language or alternate format.
 14. Thesystem as in claim 13 wherein said alternate programming languagecomprises a COBOL file layout.
 15. The system as in claim 13 whereinsaid database management system is further adapted to call one of saidplurality of user defined templates into another one of said pluralityof user defined templates as a variable.
 16. A method for generating ascript comprising: running a built-in macro for RBDMS architecturedictionary retrieval; extracting table structure data from a RBDMSarchitecture dictionary; converting said table structure data into analternate programming language file layout; arranging said tablestructure data within one of a plurality of predefined templates; andgenerating a script from said one of said plurality of predefinedtemplates.
 17. A method as in claim 16 further comprising: calling saidone of said plurality of predefined templates into another one of saidplurality of predefined templates as a variable.
 18. A method as inclaim 16 wherein arranging said table structure data within one of saidplurality of predefined templates comprises arranging said tablestructure data within one of an auto load feature, a create duplicatecopy feature, a statistics collection feature, a delete file thatoperates off another file resulting in a parallel connection, a syntaxthat purges a data table thereby linking templates together, a tablebuild feature allowing data storage for removal during fast-loadprocedures, a replace view feature, or a clean data feature.